package com.roncoo.education.course.feign;

import java.util.Map;

import javax.validation.constraints.NotNull;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import com.roncoo.education.common.service.BaseController;
import com.roncoo.education.course.feign.biz.FeignExperimentBiz;
import com.roncoo.education.course.feign.biz.FeignExperimentScoreBiz;
import com.roncoo.education.course.feign.interfaces.IFeignExperimentScore;
import com.roncoo.education.course.feign.interfaces.score.CallbackExperimentScoreReportReq;
import com.roncoo.education.course.feign.interfaces.score.CallbackExperimentScoreReq;
import com.roncoo.education.course.feign.interfaces.score.UploadResp;
import com.roncoo.education.course.feign.interfaces.vo.ExperimentViewVO;

import lombok.RequiredArgsConstructor;

/**
 * 课程信息
 *
 * @author wujing
 * @date 2022-08-27
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/course/experiment/score")
public class FeignExperimentScoreController extends BaseController implements IFeignExperimentScore {

    @NotNull
    private final FeignExperimentScoreBiz biz;
    
    @NotNull
    private final FeignExperimentBiz experimentBiz;

    @Override
    public UploadResp uploadScore(@RequestBody CallbackExperimentScoreReq req) {
        return biz.uploadScore(req);
    }
    
    @Override
	public UploadResp uploadAttachment(CallbackExperimentScoreReportReq req, MultipartFile file) {    	
    	return biz.uploadAttachment(req, file);
    }

    @Override
    public ExperimentViewVO getExperimentById(Long id) {
    	return experimentBiz.getById(id);
    }
}
